package cn.com.jdk.point;

public class AOPTargetDemo implements Point {

    @Override
    public boolean before(Object[] args) {
        System.out.println("洗手");
        return true;
    }

    @Override
    public void after(Object result, Exception e, Object[] args) {
        System.out.println(result);
        for (Object obj : args) {
            System.out.println(obj);
        }
        if (e != null) {
            String errMsg = "Caused by: " + e.getCause() + "\n    at " + e.getCause().getStackTrace()[0].toString();
            System.out.println(errMsg);
        }
    }


}
